//
//  UPNetworkPermissionChecker.h
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/19.
//

#import <Foundation/Foundation.h>
#import <CoreTelephony/CTCellularData.h>
#import <SystemConfiguration/SystemConfiguration.h>

typedef NS_ENUM(NSInteger, UPNetworkPermissionStatus) {
    UPNetworkPermissionStatusUnknown,
    UPNetworkPermissionStatusRestricted,
    UPNetworkPermissionStatusNotRestricted,
    UPNetworkPermissionStatusReachable,
    UPNetworkPermissionStatusUnreachable
};

NS_ASSUME_NONNULL_BEGIN

@interface UPNetworkPermissionChecker : NSObject

/// 检测蜂窝数据权限状态（异步回调）
+ (void)checkCellularPermissionWithCompletion:(void (^)(UPNetworkPermissionStatus status))completion;

/// 检测网络实际可达性（同步返回）
+ (BOOL)isNetworkReachable;

/// 弹窗提示用户去设置开启权限（需传入当前ViewController）
+ (void)showPermissionAlertInViewController:(UIViewController *)viewController;

@end

NS_ASSUME_NONNULL_END
